<?php 
class Application_Model_Comments extends Application_Model_DbTable_Comments{
    
    /**
     * Get comments by user name
     */
    public function getCommentsByUsername($username){
        $select  = $this->select()
        ->setIntegrityCheck(false)
        ->from('comments')
        ->join('users', 'users.user_id = comments.user_id');
        
        return $this->fetchAll($select);
    }
}